package com.firmboy.demo.hello;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 测试从配置文件加载配置信息
 *
 * @author firmboy
 * @create 2018-03-12 上午9:47
 **/
@ConfigurationProperties(prefix = "my")
@Component
public class ConfigBean {

    private String name;

    private String age;

    private int number;

    private String uuid;

    private int max;

    private String value;

    private String greeting;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public int getMax() {
        return max;
    }

    public void setMax(int max) {
        this.max = max;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getGreeting() {
        return greeting;
    }

    public void setGreeting(String greeting) {
        this.greeting = greeting;
    }

    @Override
    public String toString() {
        return "age："+getAge()+"name:"+getName()+"uuid:"+getUuid()+"value:"+getValue()+"max:"+getMax()+"number:"+getNumber();
    }
}
